<?
session_start();
include('config.php');
//include('header.php');
require_once('classes/class.jira.php');
include("classes/connect.php");
ini_set('display_errors', 'Off');

if(!isset($_SESSION["Juname"])){
	 
	echo '<meta http-equiv="refresh" content="300;url=index.php">';
}


    function getDisplay($username,$pass,$host){
        $config->username= $username;
        $config->password= $pass;
        $config->port= "";
        $config->host= $host;

        $queryIssue = new Jira($config);
        $array=$queryIssue->getUser($username);
        $response = json_decode($array->responseBody);
        return $response;
        }
		
?>
  
 <link rel="stylesheet" href="css/header.css" type="text/css" media="all">     

<link href="css/demo.css" rel="stylesheet" type="text/css" />

<div class="sonata-bc" >
    <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container-fluid header-bar-container">
                <div class="header-bar-top">
                    <a class="brand">
                        <img src="images/logo_white.png" alt="JiraPortal">Recruitment Application      
                    </a>
                </div>
            </div>

            <div class="container-fluid">
                <a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <div class="nav-collapse">
                    <ul class="nav" id="menu" style="background-color: #1C2326">
                        <li class="active">
                            <a href="home.php">Home</a>
                        </li>
                        <li >
                            <a class="dropdown-toggle" data-toggle="dropdown" href="reports/reportdash.php"> Reports</a> 
                        </li>
                        
                         <li >
                            <a class="dropdown-toggle" data-toggle="dropdown" href="reports/delayreport.php"> Delay Reports</a> 
                        </li>

                        <div class="navbar-text" style="top: 18px;">
                          
                    <p style="color: #FFFFFF;font-size: 15px;font-weight: 100;"> Welcome <?php

                            $display=  getDisplay($username, $pass, $host);
                           echo $display->displayName;
                        
                        ?> [ <a href="logout.php">Logout</a> ]<p>
                </div>
            </div>
        </div>

        </div>
    </div>
</div>
